import React from 'react'
import { Spin } from 'antd';

//引入 styled-components
import styled from 'styled-components';
const Center = styled.div`
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
`

type Props = {
    tit?: string
};
export default function Loading(props: Props) {
    const tip = props.tit ? props.tit : '加载中...'
    return (
        <Center>
            <Spin tip={tip} size="large">
                <div style={
                    {
                        padding: '50px',
                        borderRadius: "4px"
                    }
                } />
            </Spin>
        </Center>

    )
}